package com.xjc.business.service;

import com.xjc.business.entity.domain.StudentLeaveApplys;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xjc.business.entity.po.classadmin.ClassAdminLeaveApplyOpera;
import com.xjc.business.entity.po.stu.LeaveApplyPo;
import com.xjc.business.entity.vo.PageVo;
import com.xjc.business.entity.vo.classadmin.ClassLeaveApplyVo;
import com.xjc.business.entity.vo.dooradmin.StuLeaveApplyDetailsVo;
import com.xjc.business.entity.vo.stu.HistoryLeaveApplyVo;
import com.xjc.business.entity.vo.stu.LeaveApplyVo;
import com.xjc.system.result.Result;

import java.util.List;

/**
* @author root
* @description 针对表【student_leave_applys(学生请假申请表)】的数据库操作Service
* @createDate 2025-01-25 10:24:32
*/
public interface StudentLeaveApplysService extends IService<StudentLeaveApplys> {

    /**
     * 获取当前学生的请假申请
     * @param id 微信Id
     * @return Result
     */
    Result<LeaveApplyVo> getCurrentLeaveApply(Integer id);

    /**
     * 添加请假申请
     * @param leaveApplyPo 请假申请
     * @return Result
     */
    Result<String> addLeaveApply(LeaveApplyPo leaveApplyPo);

    /**
     * 获取请假申请列表
     * @param pageSize 每页显示条数
     * @param currentPage 当前页
     * @param classAdminId 辅导员id
     * @param status 状态
     * @param stuName 学生姓名
     * @return Result
     */
    Result<PageVo<ClassLeaveApplyVo>> getLeaveApplyPage(Integer pageSize, Integer currentPage, Integer classAdminId, Integer status, String stuName);

    /**
     * 辅导员审批请假申请
     * @param classAdminLeaveApplyOpera 审批意见
     * @return Result
     */
    Result<String> leaveApplyOpera(ClassAdminLeaveApplyOpera classAdminLeaveApplyOpera);

    /**
     * 获取请假申请列表
     * @param pageSize 每页显示条数
     * @param currentPage 当前页
     * @param collegeAdminId 学院管理员id
     * @param status 状态
     * @param stuName 学生姓名
     * @return Result
     */
    Result<PageVo<ClassLeaveApplyVo>> getLeaveApplyPage2(Integer pageSize, Integer currentPage, Integer collegeAdminId, Integer status, String stuName);

    /**
     * 学院管理员审批请假申请
     * @param classAdminLeaveApplyOpera 审批意见
     * @return Result
     */
    Result<String> leaveApplyOpera2(ClassAdminLeaveApplyOpera classAdminLeaveApplyOpera);

    /**
     * 出示二维码
     * @param id 请假记录Id
     * @return Result
     */
    Result<String> showCode(Integer id);

    /**
     * 获取请假申请详情
     * @param id 请假记录id
     * @return 请假申请详情
     */
    Result<StuLeaveApplyDetailsVo> getLeaveApplyDetails(Integer id);

    /**
     * 验证请假申请
     * @param id 请假记录id
     * @return 是否验证成功
     */
    Result<Boolean> validateLeaveApply(Integer id);

    /**
     * 销假
     * @param id 请假记录id
     * @return 反馈
     */
    Result<String> changeStatus(Integer id);

    /**
     * 获取历史请假申请
     * @param id 微信Id
     * @return Result
     */
    Result<List<HistoryLeaveApplyVo>> getHistoryLeaveApplyList(Integer id);
}
